<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 统计字符串中某个字符出现的次数 -->
    <script>
      let str = 'abbbbbbbbcdefg'
      let str1 = str.match(/b/g)
      console.log(str1.length)
    </script>
  </body>
</html>
